#include "MonetaryValuedCircularMetalObjectDeviceController.h"
#include "Arduino.h"
MonetaryValuedCircularMetalObjectDeviceController::MonetaryValuedCircularMetalObjectDeviceController(IMoneyHAL *HAL)
{
	this->HAL = HAL;
	amtOf10sEntered = amtOf200sEntered = amtOf50sEntered = 0;

}

void MonetaryValuedCircularMetalObjectDeviceController::giveBack()
{
	//
}

void MonetaryValuedCircularMetalObjectDeviceController::giveBackRest(int amount)
{
	if (amount==0) return;
	//
}


void MonetaryValuedCircularMetalObjectDeviceController::onClear()
{
	amtOf10sEntered = amtOf50sEntered = amtOf200sEntered = 0;
}

unsigned int MonetaryValuedCircularMetalObjectDeviceController::getAmountEntered()
{
	return (10*amtOf10sEntered)+(50*amtOf50sEntered)+(200*amtOf200sEntered);
}

void MonetaryValuedCircularMetalObjectDeviceController::cents10Entered()
{
	if(amtOf10sEntered < 3)
    {
        amtOf10sEntered++;
    }
}

void MonetaryValuedCircularMetalObjectDeviceController::cents50Entered()
{
    if (amtOf50sEntered < 3)
    {
        amtOf50sEntered++;
    }
}

void MonetaryValuedCircularMetalObjectDeviceController::cents200Entered()
{
    if (amtOf200sEntered < 2)
    {
        amtOf200sEntered++;
    }
}
